var dom = document.getElementById("main");
var myChart = echarts.init(dom);
option = {
    tooltip: {
        trigger: 'item',
        
        formatter: "{b}: {c} ({d}%)"
    },
    legend: {
        
        data:['QQ','网易云音乐','支付宝','微信','bilibili','谷歌浏览器','饿了么']
    },
    series: [
        {
            type: 'pie',
            radius :'35%',
            center: ['45%', '75%'],
            data:[
                {value:46, name:'QQ'},
                {value:5, name:'网易云音乐'},
                {value:4, name:'支付宝'},
                {value:23, name:'微信'},
                {value:233, name:'bilibili'},
                {value:12, name:'谷歌浏览器'},
                {value:2, name:'饿了么'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 20,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};
myChart.setOption(option, true);